FROM python:3
WORKDIR /app

COPY ./code/requirements.txt .
RUN pip install --upgrade pip -i https://pypi.tuna.tsinghua.edu.cn/simple
RUN pip install -r ./requirements.txt -i https://pypi.tuna.tsinghua.edu.cn/simple
CMD gunicorn --worker-class=\gevent cityplatjsc.wsgi:application -b 0.0.0.0:5001 -w 2 --reload > logs/gunicorn.log

# 前置条件：在djangoapp中创建code目录，并从git中拉取代码